import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { config } from "./src/config";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    host: '0.0.0.0',
    port: 4000,
    proxy: {
      '/submit': {
        target: config.host,
        changeOrigin: false,
      },
      '/getDoc': {
        target: config.host,
        changeOrigin: false,
      },
      '/yiriDoc': {
        target: config.host,
        changeOrigin: false,
      },
      '/api': {
        target: config.host,
        changeOrigin: false,
      }
    }
  },
  base: './'
})
